package com.woniuxy.portal.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.woniuxy.portal.entity.User;
import com.woniuxy.portal.mapper.UserMapper;
import com.woniuxy.portal.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 作者
 * @since 2023-09-15
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public User login(String account, String password) {
        return this.getOne(
                Wrappers.lambdaQuery(User.class)
                        .eq(User::getAccount,account)
                        .eq(User::getPassword,password)
        );
    }
}
